﻿using LiveCharts;
using LiveCharts.Defaults;
using LiveCharts.Wpf;
using Power.ViewModel.Report;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Power.View.Report
{
    /// <summary>
    /// 缺陷密度图
    /// </summary>
    public partial class DefectDensityCharts : UserControl
    {
        public DefectDensityCharts()
        {
            InitializeComponent();
            this.DataContext = new DefectDensityChartsViewModel(this);
           
        }

        public void Init()
        {
            
            chart.Series = new SeriesCollection
            {
                new ColumnSeries
                {
                    Values = new ChartValues<decimal> { 45, 65, 30, 90,230}
                }
            };
            chart.AxisX.Add(new Axis()
            {
                Separator = new LiveCharts.Wpf.Separator()
                {
                    Step = 1
                },
                Labels = new string[] { "1级", "2级", "3级", "4级" ,"合计"}
            });
        }
    }
}
